import request from '@/utils/request'

// 查询解约协议列表
export function listAgreements(query) {
  return request({
    url: '/business/agreements/list',
    method: 'get',
    params: query
  })
}

// 查询解约协议详细
export function getAgreements(id) {
  return request({
    url: '/business/agreements/' + id,
    method: 'get'
  })
}

// 新增解约协议
export function addAgreements(data) {
  return request({
    url: '/business/agreements',
    method: 'post',
    data: data
  })
}

// 修改解约协议
export function updateAgreements(data) {
  return request({
    url: '/business/agreements',
    method: 'put',
    data: data
  })
}

// 删除解约协议
export function delAgreements(id) {
  return request({
    url: '/business/agreements/' + id,
    method: 'delete'
  })
}
